<%@page import="cn.com.entity.Doctor"%>
<%@page import="cn.com.dao.DoctorDao"%>
<%@page import="cn.com.entity.Departments"%>
<%@page import="cn.com.dao.DepartmentsDao"%>
<%@page import="cn.com.entity.Registerform"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<style type="text/css">		
a:visited {
	text-decoration: none;
	color: #03C;
}
a:hover {
	text-decoration: none;
	color: #69C;
}
a:active {
	text-decoration: none;
}
a:link {
	
	text-decoration: none;
}
body{
	color: #03C;
	font-size: 20px;
}
</style>
</head>
<body>
<h2 align="center">我的挂号单</h2>
<table border="1" align="center" width="60%">
	<tr>
		<td>预约挂号单序号</td>
		<td>挂号科室</td>
		<td>挂号医生</td>
		<td>医生职称</td>
		<td>挂号时间</td>
	</tr>
<%

if(session.getAttribute("rfbyconsumeridlist")!=null){
	List<Registerform> list=(List<Registerform>)session.getAttribute("rfbyconsumeridlist");
	for(int i=0;i<list.size();i++){
		Registerform rf=list.get(i);
		
		int departid=rf.getDepartmentsid();
		int doctorid=rf.getDoctorid();
		DepartmentsDao dd=new DepartmentsDao();
		DoctorDao docd=new DoctorDao();
		
		Departments d=dd.selectOneDepartments(departid);
		Doctor doc=docd.selectOneDoctorByid(doctorid);
%>	
	<tr>
		<td><%=i+1 %></td>
		<td><%=d.getDepartmentsname() %></td>
		<td><%=doc.getDoctorrealname() %></td>
		<td><%=doc.getDoctordesignation() %></td>
		<td><%=rf.getRegistertime() %></td>
	</tr>
<%} 
}%>	
</table>




</body>
</html>